home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1994 / MacHack 1994.toast / MacHack™ 1987-1994 / MacHack™ '93 / Papers '93 / Macintosh as Internet Server ƒ / inetd / Libraries / MacTCPLib / TCP.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-03-08  |  785 b   |  35 lines  |  [TEXT/MPS ]

  1.  
  2. #ifndef __TCPLIB__
  3. #define __TCPLIB__
  4.  
  5. #ifndef __MACTCPCOMMONTYPES__
  6. #include <MacTCPCommonTypes.h>
  7. #endif
  8. #ifndef __TCPPB__
  9. #include <TCPPB.h>
  10. #endif
  11.  
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15.  
  16. #define    WDS(bufCount) struct {                \
  17.     wdsEntry            block[bufCount];    \
  18.     unsigned short        zero;                \
  19. }
  20.  
  21. StreamPtr    tcpCreate(int bufSize, TCPNotifyProc asr, Ptr usrData);
  22. OSErr        tcpOpen(StreamPtr stream, ip_addr host, tcp_port port);
  23. OSErr        tcpOpenReserved(StreamPtr stream, ip_addr host, tcp_port port);
  24. OSErr        tcpRead(StreamPtr stream, void* buffer, short* len);
  25. OSErr        tcpWrite(StreamPtr stream, void* buffer, short len);
  26. OSErr        tcpWriteWDS(StreamPtr stream, wdsEntry* wds);
  27. OSErr        tcpClose(StreamPtr stream);
  28. OSErr        tcpStatus(StreamPtr stream, TCPiopb* pb);
  29.  
  30. #ifdef __cplusplus
  31. }
  32. #endif
  33.  
  34. #endif
  35.